<%@ page import="java.util.Arrays" %><%--
  Created by IntelliJ IDEA.
  User: oldliu
  Date: 2023-04-06
  Time: 9:14
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<html>
<head>
    <title>Title</title>
</head>
<body>
    <h1>调查结果</h1>
   <%
       request.setCharacterEncoding("utf-8");//前面
       String ip=request.getRemoteHost();
       String name=request.getParameter("name");//?null
       String []like=request.getParameterValues("like");
       String phone=request.getParameter("telephone");
       String sex=request.getParameter("sex");
       // String ageStr=request.getParameter("age");
       //int age=Integer.parseInt(request.getParameter("age"));
   %>
<h1><%=ip%></h1>
<h1>name:<%=name%></h1>
<h1>phone:<%=phone%></h1>
<h1>sex:<%=sex%></h1>
<h1>爱好:<%=Arrays.toString(like)%></h1>
<%--<h1>年龄:<%=age%></h1>--%>
<%
    //request.getRequestDispatcher("students.jsp").forward(request,response);
%>
</body>
</html>
